<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.Edit类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_edit.html">Edit</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_edit-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.Edit类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.Edit 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_edit.png" usemap="#awtk.Edit_map" alt=""/>
  <map id="awtk.Edit_map" name="awtk.Edit_map">
<area href="classawtk_1_1_spin_box.html" alt="awtk.SpinBox" shape="rect" coords="0,112,87,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae3a8eba0f9052f74dcb1aac0ee1ec659"><td class="memItemLeft" align="right" valign="top"><a id="ae3a8eba0f9052f74dcb1aac0ee1ec659"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Edit</b> (long nativeObj)</td></tr>
<tr class="separator:ae3a8eba0f9052f74dcb1aac0ee1ec659"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c8b3e7652785d9add4cd2fa69d188d1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a5c8b3e7652785d9add4cd2fa69d188d1">getInt</a> ()</td></tr>
<tr class="separator:a5c8b3e7652785d9add4cd2fa69d188d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35f8bcdea96fb5dfa330ecc767fb5203"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a35f8bcdea96fb5dfa330ecc767fb5203">getDouble</a> ()</td></tr>
<tr class="separator:a35f8bcdea96fb5dfa330ecc767fb5203"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1221615b28adc9bd1384c3413189d3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#ae1221615b28adc9bd1384c3413189d3f">setInt</a> (int value)</td></tr>
<tr class="separator:ae1221615b28adc9bd1384c3413189d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6c9d189a58370fc00ef013eddb24dba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#af6c9d189a58370fc00ef013eddb24dba">setDouble</a> (double value)</td></tr>
<tr class="separator:af6c9d189a58370fc00ef013eddb24dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada99da0b1d4805ab5f7075a6233a3d6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#ada99da0b1d4805ab5f7075a6233a3d6c">setTextLimit</a> (int min, int max)</td></tr>
<tr class="separator:ada99da0b1d4805ab5f7075a6233a3d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14574bdd00efd1577d2eb83b1797f492"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a14574bdd00efd1577d2eb83b1797f492">setIntLimit</a> (int min, int max, int step)</td></tr>
<tr class="separator:a14574bdd00efd1577d2eb83b1797f492"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac80d3049c6e86169c92c3976bd4d4f64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#ac80d3049c6e86169c92c3976bd4d4f64">setFloatLimit</a> (double min, double max, double step)</td></tr>
<tr class="separator:ac80d3049c6e86169c92c3976bd4d4f64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae37af49bf223fd1e56f70a7b1a27dc60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#ae37af49bf223fd1e56f70a7b1a27dc60">setReadonly</a> (boolean readonly)</td></tr>
<tr class="separator:ae37af49bf223fd1e56f70a7b1a27dc60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73d016af3083dc6d91d8241fcf69d28f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a73d016af3083dc6d91d8241fcf69d28f">setAutoFix</a> (boolean auto_fix)</td></tr>
<tr class="separator:a73d016af3083dc6d91d8241fcf69d28f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac58e84294d662d925917161825644954"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#ac58e84294d662d925917161825644954">setSelectNoneWhenFocused</a> (boolean select_none_when_focused)</td></tr>
<tr class="separator:ac58e84294d662d925917161825644954"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8913baa1db627fb1781ab5df104ddba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a8913baa1db627fb1781ab5df104ddba5">setOpenImWhenFocused</a> (boolean open_im_when_focused)</td></tr>
<tr class="separator:a8913baa1db627fb1781ab5df104ddba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ff3faf904c3e4ae78b52575f54fc73b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a2ff3faf904c3e4ae78b52575f54fc73b">setInputType</a> (<a class="el" href="enumawtk_1_1_input_type.html">InputType</a> type)</td></tr>
<tr class="separator:a2ff3faf904c3e4ae78b52575f54fc73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b197d9c67c9babaa7fb7323db6828f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a0b197d9c67c9babaa7fb7323db6828f4">setInputTips</a> (String tips)</td></tr>
<tr class="separator:a0b197d9c67c9babaa7fb7323db6828f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4f85887c0137a5d07d4c6898e14933e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#aa4f85887c0137a5d07d4c6898e14933e">setPasswordVisible</a> (boolean password_visible)</td></tr>
<tr class="separator:aa4f85887c0137a5d07d4c6898e14933e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe254069e9e0b189722cc3a2a09b7361"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#abe254069e9e0b189722cc3a2a09b7361">setFocus</a> (boolean focus)</td></tr>
<tr class="separator:abe254069e9e0b189722cc3a2a09b7361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af00cb68c37eaed4d8e0637ed432d825c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#af00cb68c37eaed4d8e0637ed432d825c">setCursor</a> (int cursor)</td></tr>
<tr class="separator:af00cb68c37eaed4d8e0637ed432d825c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99f49829b0c8e22f2b034750049c4c97"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a99f49829b0c8e22f2b034750049c4c97">getReadonly</a> ()</td></tr>
<tr class="separator:a99f49829b0c8e22f2b034750049c4c97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b043f407ed2bb0cd700242efae8d1ba"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a4b043f407ed2bb0cd700242efae8d1ba">getPasswordVisible</a> ()</td></tr>
<tr class="separator:a4b043f407ed2bb0cd700242efae8d1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32a66d4d8ac697e8a5cf7aabf99c617e"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a32a66d4d8ac697e8a5cf7aabf99c617e">getAutoFix</a> ()</td></tr>
<tr class="separator:a32a66d4d8ac697e8a5cf7aabf99c617e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a09fa84f6548acc2d3dfc7c6bc41a30"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a9a09fa84f6548acc2d3dfc7c6bc41a30">getSelectNoneWhenFocused</a> ()</td></tr>
<tr class="separator:a9a09fa84f6548acc2d3dfc7c6bc41a30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaa6e62ba883e95d2d9bdaa928bc6855"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#aeaa6e62ba883e95d2d9bdaa928bc6855">getOpenImWhenFocused</a> ()</td></tr>
<tr class="separator:aeaa6e62ba883e95d2d9bdaa928bc6855"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba5ce5cc8bec16faf48b4ffe08ac1cd0"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#aba5ce5cc8bec16faf48b4ffe08ac1cd0">getTips</a> ()</td></tr>
<tr class="separator:aba5ce5cc8bec16faf48b4ffe08ac1cd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54f06569ba247001c8d8435dae92e42b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_input_type.html">InputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a54f06569ba247001c8d8435dae92e42b">getInputType</a> ()</td></tr>
<tr class="separator:a54f06569ba247001c8d8435dae92e42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97853dc096ab80d5b954bcacbb599060"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a97853dc096ab80d5b954bcacbb599060">getMin</a> ()</td></tr>
<tr class="separator:a97853dc096ab80d5b954bcacbb599060"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbd1b655383bf65b0840fcf7ef2cd3af"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#afbd1b655383bf65b0840fcf7ef2cd3af">getMax</a> ()</td></tr>
<tr class="separator:afbd1b655383bf65b0840fcf7ef2cd3af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bbb6e118e182d770e907df81228e4a0"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a4bbb6e118e182d770e907df81228e4a0">getStep</a> ()</td></tr>
<tr class="separator:a4bbb6e118e182d770e907df81228e4a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a147dd5a950ce5e326460d030c5d958c8"><td class="memItemLeft" align="right" valign="top"><a id="a147dd5a950ce5e326460d030c5d958c8"></a>
static <a class="el" href="classawtk_1_1_edit.html">Edit</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:a147dd5a950ce5e326460d030c5d958c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a3894ad6667cbd81e9d0a6e263d7b2"><td class="memItemLeft" align="right" valign="top">static Widget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#aa8a3894ad6667cbd81e9d0a6e263d7b2">create</a> (Widget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:aa8a3894ad6667cbd81e9d0a6e263d7b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35417ea58226fa918f7bec83429246a6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_edit.html">Edit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_edit.html#a35417ea58226fa918f7bec83429246a6">cast</a> (Widget widget)</td></tr>
<tr class="separator:a35417ea58226fa918f7bec83429246a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a4d27a977d04a74fa13e940eaf72aed7f"><td class="memItemLeft" align="right" valign="top"><a id="a4d27a977d04a74fa13e940eaf72aed7f"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a4d27a977d04a74fa13e940eaf72aed7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>单行编辑器控件。</p>
<p>在基于SDL的平台，单行编辑器控件使用平台原生的输入法，对于嵌入式平台使用内置的输入法。</p>
<p>在使用内置的输入法时，软键盘由输入类型决定，开发者可以自定义软键盘的界面。</p>
<p>edit_t是widget的子类控件，widget_t的函数均适用于edit_t控件。</p>
<p>edit_t本身可以做为容器，放入按钮等控件。有几个特殊的子控件：</p>
<ul>
<li>名为"clear"的按钮。点击时清除编辑器中的内容。</li>
<li>名为"inc"的按钮。点击时增加编辑器的值，用于实现类似于spinbox的功能。</li>
<li>名为"dec"的按钮。点击时减少编辑器的值，用于实现类似于spinbox的功能。</li>
<li>名为"visible"的复选框。勾选时显示密码，反之不显示密码。</li>
</ul>
<p>在xml中使用"edit"标签创建编辑器控件。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">edit</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span></div><div class="line"><span class="keyword">tips</span>=<span class="stringliteral">&quot;age&quot;</span> <span class="keyword">input_type</span>=<span class="stringliteral">&quot;uint&quot;</span> <span class="keyword">min</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">max</span>=<span class="stringliteral">&quot;150&quot;</span> <span class="keyword">step</span>=<span class="stringliteral">&quot;1&quot;</span> <span class="keyword">auto_fix</span>=<span class="stringliteral">&quot;true&quot;</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;number&quot;</span> /&gt;</div></div><!-- fragment --><p>XXX：需要在min/max/step之前设置input_type。</p>
<p>更多用法请参考： <a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/edit.xml">edit.xml</a></p>
<p>在c代码中使用函数edit_create创建编辑器控件。如：</p>
<p>创建之后，可以用widget_set_text或widget_set_text_utf8设置文本内容。</p>
<p>完整示例请参考： <a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/edit.c">edit demo</a></p>
<p>可用通过style来设置控件的显示风格，如字体的大小和颜色等等。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>  <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span> <span class="keyword">text_align_h</span>=<span class="stringliteral">&quot;left&quot;</span>&gt;</div><div class="line">&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> /&gt;</div><div class="line">&lt;<span class="keywordtype">focused</span>    <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;black&quot;</span>/&gt;</div><div class="line">&lt;<span class="keywordtype">disable</span>    <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;gray&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;#d0d0d0&quot;</span> /&gt;</div><div class="line">&lt;<span class="keywordtype">error</span>      <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;red&quot;</span> /&gt;</div><div class="line">&lt;<span class="keywordtype">empty</span>      <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span> /&gt;</div><div class="line">&lt;/<span class="keywordtype">style</span>&gt;</div></div><!-- fragment --><p>更多用法请参考： <a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L104">theme default</a> </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a35417ea58226fa918f7bec83429246a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35417ea58226fa918f7bec83429246a6">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_edit.html">Edit</a> awtk.Edit.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为edit对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>edit对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>edit对象。 </dd></dl>

</div>
</div>
<a id="aa8a3894ad6667cbd81e9d0a6e263d7b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8a3894ad6667cbd81e9d0a6e263d7b2">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Widget awtk.Edit.create </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建edit对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a32a66d4d8ac697e8a5cf7aabf99c617e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32a66d4d8ac697e8a5cf7aabf99c617e">&#9670;&nbsp;</a></span>getAutoFix()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Edit.getAutoFix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>输入无效时，是否自动改正。 </p>

</div>
</div>
<a id="a35f8bcdea96fb5dfa330ecc767fb5203"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35f8bcdea96fb5dfa330ecc767fb5203">&#9670;&nbsp;</a></span>getDouble()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.Edit.getDouble </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取double类型的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回double的值。 </dd></dl>

</div>
</div>
<a id="a54f06569ba247001c8d8435dae92e42b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54f06569ba247001c8d8435dae92e42b">&#9670;&nbsp;</a></span>getInputType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_input_type.html">InputType</a> awtk.Edit.getInputType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>输入类型。 </p>

</div>
</div>
<a id="a5c8b3e7652785d9add4cd2fa69d188d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c8b3e7652785d9add4cd2fa69d188d1">&#9670;&nbsp;</a></span>getInt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Edit.getInt </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取int类型的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回int的值。 </dd></dl>

</div>
</div>
<a id="afbd1b655383bf65b0840fcf7ef2cd3af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbd1b655383bf65b0840fcf7ef2cd3af">&#9670;&nbsp;</a></span>getMax()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.Edit.getMax </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>最大值或最大长度。 </p>

</div>
</div>
<a id="a97853dc096ab80d5b954bcacbb599060"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97853dc096ab80d5b954bcacbb599060">&#9670;&nbsp;</a></span>getMin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.Edit.getMin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>最小值或最小长度。 </p>

</div>
</div>
<a id="aeaa6e62ba883e95d2d9bdaa928bc6855"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeaa6e62ba883e95d2d9bdaa928bc6855">&#9670;&nbsp;</a></span>getOpenImWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Edit.getOpenImWhenFocused </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获得焦点时打开输入法。</p>
<p>主要用于没有指针设备的情况，否则每次切换焦点时都打开输入法。 </p>

</div>
</div>
<a id="a4b043f407ed2bb0cd700242efae8d1ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b043f407ed2bb0cd700242efae8d1ba">&#9670;&nbsp;</a></span>getPasswordVisible()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Edit.getPasswordVisible </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>密码是否可见。 </p>

</div>
</div>
<a id="a99f49829b0c8e22f2b034750049c4c97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99f49829b0c8e22f2b034750049c4c97">&#9670;&nbsp;</a></span>getReadonly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Edit.getReadonly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>编辑器是否为只读。 </p>

</div>
</div>
<a id="a9a09fa84f6548acc2d3dfc7c6bc41a30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a09fa84f6548acc2d3dfc7c6bc41a30">&#9670;&nbsp;</a></span>getSelectNoneWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Edit.getSelectNoneWhenFocused </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获得焦点时不选中文本。</p>
<p>主要用于没有指针设备的情况，否则软键盘无法取消选中文本。 </p>

</div>
</div>
<a id="a4bbb6e118e182d770e907df81228e4a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bbb6e118e182d770e907df81228e4a0">&#9670;&nbsp;</a></span>getStep()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.Edit.getStep </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>步长。 作为数值型编辑器时，一次增加和减少时的数值。 </p>

</div>
</div>
<a id="aba5ce5cc8bec16faf48b4ffe08ac1cd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba5ce5cc8bec16faf48b4ffe08ac1cd0">&#9670;&nbsp;</a></span>getTips()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.Edit.getTips </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>输入提示。 </p>

</div>
</div>
<a id="a73d016af3083dc6d91d8241fcf69d28f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73d016af3083dc6d91d8241fcf69d28f">&#9670;&nbsp;</a></span>setAutoFix()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setAutoFix </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>auto_fix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器是否为自动改正。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">auto_fix</td><td>自动改正。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af00cb68c37eaed4d8e0637ed432d825c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af00cb68c37eaed4d8e0637ed432d825c">&#9670;&nbsp;</a></span>setCursor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setCursor </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cursor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置输入框的光标坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cursor</td><td>是否为焦点。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af6c9d189a58370fc00ef013eddb24dba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6c9d189a58370fc00ef013eddb24dba">&#9670;&nbsp;</a></span>setDouble()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setDouble </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置double类型的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac80d3049c6e86169c92c3976bd4d4f64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac80d3049c6e86169c92c3976bd4d4f64">&#9670;&nbsp;</a></span>setFloatLimit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setFloatLimit </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置为浮点数输入及取值范围。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小值。 </td></tr>
    <tr><td class="paramname">max</td><td>最大值。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="abe254069e9e0b189722cc3a2a09b7361"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe254069e9e0b189722cc3a2a09b7361">&#9670;&nbsp;</a></span>setFocus()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setFocus </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>focus</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置为焦点。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">focus</td><td>是否为焦点。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0b197d9c67c9babaa7fb7323db6828f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b197d9c67c9babaa7fb7323db6828f4">&#9670;&nbsp;</a></span>setInputTips()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setInputTips </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>tips</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器的输入提示。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">tips</td><td>输入提示。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a2ff3faf904c3e4ae78b52575f54fc73b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ff3faf904c3e4ae78b52575f54fc73b">&#9670;&nbsp;</a></span>setInputType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setInputType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="enumawtk_1_1_input_type.html">InputType</a>&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器的输入类型。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>输入类型。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae1221615b28adc9bd1384c3413189d3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1221615b28adc9bd1384c3413189d3f">&#9670;&nbsp;</a></span>setInt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setInt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置int类型的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a14574bdd00efd1577d2eb83b1797f492"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14574bdd00efd1577d2eb83b1797f492">&#9670;&nbsp;</a></span>setIntLimit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setIntLimit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置为整数输入及取值范围。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小值。 </td></tr>
    <tr><td class="paramname">max</td><td>最大值。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8913baa1db627fb1781ab5df104ddba5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8913baa1db627fb1781ab5df104ddba5">&#9670;&nbsp;</a></span>setOpenImWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setOpenImWhenFocused </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>open_im_when_focused</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器是否在获得焦点时打开输入法。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">open_im_when_focused</td><td>是否在获得焦点时打开输入法。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa4f85887c0137a5d07d4c6898e14933e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4f85887c0137a5d07d4c6898e14933e">&#9670;&nbsp;</a></span>setPasswordVisible()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setPasswordVisible </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>password_visible</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当编辑器输入类型为密码时，设置密码是否可见。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">password_visible</td><td>密码是否可见。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae37af49bf223fd1e56f70a7b1a27dc60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae37af49bf223fd1e56f70a7b1a27dc60">&#9670;&nbsp;</a></span>setReadonly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setReadonly </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>readonly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器是否为只读。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">readonly</td><td>只读。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac58e84294d662d925917161825644954"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac58e84294d662d925917161825644954">&#9670;&nbsp;</a></span>setSelectNoneWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setSelectNoneWhenFocused </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>select_none_when_focused</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编辑器是否在获得焦点时不选中文本。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">select_none_when_focused</td><td>是否在获得焦点时不选中文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ada99da0b1d4805ab5f7075a6233a3d6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada99da0b1d4805ab5f7075a6233a3d6c">&#9670;&nbsp;</a></span>setTextLimit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Edit.setTextLimit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置为文本输入及其长度限制，不允许输入超过max个字符，少于min个字符时进入error状态。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小长度。 </td></tr>
    <tr><td class="paramname">max</td><td>最大长度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/Edit.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
